<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML>
<html>
<head>
    <%@ include file="/common/include-core.jsp" %>
    <%@ include file="/common/jspTemplate.jsp" %>
    <title>添加活动</title>
    <!-- 配置文件 -->
    <script type="text/javascript" src="/static/ueditor/ueditor.config.js"></script>
    <!-- 编辑器源码文件 -->
    <script type="text/javascript" src="/static/ueditor/ueditor.all.js"></script>
    <link rel="stylesheet" type="text/css" href="/static/ueditor/themes/default/css/ueditor.css" />
</head>
<body>
<article class="page-container">
    <form action="" class="form form-horizontal" id="form-member-add">
        <input id="tid" name="tid" value="${activity.tid}" type="hidden">
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">活动名称：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="${activity.activityName}" id="activityName" name="activityName">
            </div>
        </div>
       <%-- <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">活动简介：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="${activity.summary}" id="summary" name="summary">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">活动详情：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <textarea id="activityInfo" name="activityInfo" style="height: 80%">${activity.activityInfo}</textarea>
                <script type="text/javascript">
                    UE.getEditor('activityInfo',{
                        //toolbars:[['FullScreen','simpleupload' , 'Source', 'Undo', 'Redo','Bold','test']],
                        initialFrameWidth:850,
                        initialFrameHeight:150
                    });
                </script>
            </div>
        </div>--%>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">活动价格：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="${activity.price}" id="price" name="price">
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">活动类型：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <span class="select-box">
                    <select class="select" name="activityType">
                        <option value="4"  ${activity.activityType==1?"selected":"" }>优惠活动</option>
                    </select>
				</span>
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">优惠类型：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <span class="select-box">
                    <select class="select" name="discountsType">
                        <option value="2"  ${activity.discountsType==1?"selected":"" }>减少</option>
                        <option value="3"  ${activity.discountsType==2?"selected":"" }>减到</option>
                    </select>
				</span>
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">活动页面地址：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="${activity.activityUrl}" id="activityUrl" name="activityUrl">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">来源二维码地址：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="${activity.sourceQrCode}" id="sourceQrCode" name="sourceQrCode">
            </div>
        </div>

        <%--<div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">关联产品：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <span class="select-box">
&lt;%&ndash;                    <select class="select" name="productId">
                        <option value="0" ${activity.productId==0?"selected":"" }>无关联产品</option>
                        <c:forEach items="${productList}" var="item">
                            <option value="${item.productId}" ${activity.productId==item.productId?"selected":"" }>${item.productName}</option>
                        </c:forEach>
                    </select>&ndash;%&gt;
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="hidden" value="${activity.productId}" id="productId" name="productId" >
                    <input type="text" class="input-text" placeholder="关联产品" value="${activity.productId}"
                       id="productName" onclick="showGetProduct();" readonly>
                 </div>
				</span>
            </div>
        </div>--%>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">活动开始时间：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="<fmt:formatDate value="${activity.startDate}"   pattern="yyyy-MM-dd" />" onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd' })" id="startDate" name="startDate">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">活动结束时间：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="<fmt:formatDate value="${activity.endDate}"   pattern="yyyy-MM-dd" />" onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd' })" id="endDate" name="endDate">
            </div>
        </div>

        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <input class="btn btn-primary radius" type="submit" id="advertSubmit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
            </div>
        </div>
    </form>
</article>

<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="/static/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/static/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="/static/h-ui.admin/js/H-ui.admin.js"></script>
<!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/static/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script type="text/javascript" src="/static/js/web/activity/activity.js"></script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>